<!--%import("css/default.css")-->
<!--%import("css/tipsy.css")-->
<!--%import("css/jquery.contextmenu.css")-->

<!--%import("js/_lib/jquery.cookie.js")-->
<!--%import("js/_lib/jquery.hotkeys.js")-->
<!--%import("js/jquery.jstree.js")-->
<!--%import("js/jquery.tipsy.js")-->
<!--%import("js/purplebook.js")-->
<!--%import("js/filepicker.js")-->
<!--%import("js/autoresize.jquery.js")-->
<!--%import("js/json2.js")-->
<!--%import("js/jquery.contextmenu.js")-->
<!--%import("js/jquery.progressbar.js")-->
<!--%import("js/jquery.simplemodal-1.3.js")-->
<!--%load_js_plugin("ui")-->
<!--%load_js_plugin("ui.datepicker")-->


<div id="hearder_title"></div>

<div id="smsPurplebook_top"></div>
<div id="smsPurplebook">
	<div class="purplebook_left border-radius">	
	
		<div class="left_list">
			<div class="title"><p><img src="img/leftlist_title.gif" alt="주소록" /></p><span class="total"></span></div>
			<div class="title_info">폴더 목록</div>
			<div class="bodyArea"><div id="smsPurplebookTree"></div></div>
			<div class="bottomArea">
				<a id="smsPurplebookRefreshTree" href="#" title="폴더목록을 새로고침"><img src="img/btn_refresh.gif" alt="새로고침" /></a>
				<a id="btn_empty_trash" href="#" title="휴지통 비우기"><img src="img/empty.png" alt="휴지통 비우기" /></a>
				<a id="btn_pop_manual" class="pop_menual btn_menual" href="#" onfocus="this.blur()" title="사용방법을 알고 싶으실 때"><img src="img/btn_menual.gif" alt="사용법" /></a>
			</div>
		</div><!-- 1번 주소 폴더 목록 끝 -->

		<!-- 레이어 팝업 영역 -->
		<div class="layer_properties draggable">
			<div class="title"><p>속성보기</p><span class="btn_closex"><a href="#"><img src="img/btn_close.gif" alt="close" /></a></span></div>
            <div class="bodyArea"><ul id="properties_list"></ul></div>
			<div class="bottomArea">
			</div>
		</div><!-- 속성보기 -->

		<div class="layer_share draggable">
			<div class="title"><p>폴더 공유</p><span class="btn_closex"><a href="#"><img src="img/btn_close.gif" alt="close" /></a></span></div>
            <div class="bodyArea"><ul id="share_list"></ul></div>
			<div class="bottomArea">
                <input type="text" id="input_user_id" class="inputTypeText" value="" /><button id="btn_append_id">추가</button>
			</div>
		</div><!-- 폴더 공유 -->

		<div class="layer_menual draggable">
			<div class="title"><p>사용법 안내</p><span class="btn_closex"><a href="#"><img src="img/btn_close.gif" alt="close" /></a></span></div>
			<div class="bodyArea"></div>
		</div><!-- 사용법 레이어 -->

		<div class="left_select">
            <div class="title"><p><img src="img/leftselect_title.gif" alt="선택목록" /></p><span class="total" id="smsPurplebookListCount">(총 0/명)</span><span class="search"><input type="text" id="search_word" class="inputTypeText" value="" title="검색할 이름 혹은 전화번호를 입력" /><a href="#" id="btn_search"><img src="img/btn_search.gif" alt="검색" /></a></span></div>
            <div class="title_info"><span class="checkbox" id="smsPurplebookToggleList" title="선택전환"></span><span class="name">이름</span><span class="h_number">핸드폰 번호</span></div>
			<div class="bodyArea"><ul id="smsPurplebookList"></ul></div>
			<div class="bottomArea">
				<a class="pop_append" href="#" title="선택목록에 명단을 추가"><img src="img/btn_append.gif" alt="추가" /></a>
				<a class="btn_excel" id="btnPurplebookExcelDownload" href="#" onfocus="this.blur()"><img src="img/btn_excel.gif" alt="엑셀" title="선택목록을 엑셀파일로 다운로드" /></a>
				<a class="btn_delete" href="#" title="체크한 명단을 휴지통으로 이동"><img src="img/btn_remove.gif" alt="삭제" /></a>
				<a class="pop_copy" href="#" title="체크한 명단을 특정폴더로 복사"><img src="img/btn_copy.gif" alt="복사" /></a>
				<a class="pop_move" href="#" title="체크한 명단을 특정폴더로 이동"><img src="img/btn_move.gif" alt="이동" /></a>
			</div>
		</div><!-- 2번 주소 폴더 선택 끝 -->

		<div class="layer_append draggable">
			<div class="title"><p>항목을 입력하고 추가 버튼을 누르세요</p><span class="btn_closex"><a href="#"><img src="img/btn_close.gif" alt="close" /></a></span></div>
            <div class="bodyArea">
                <input type="text" id="inputPurplebookName" name="inputPurplebookName" class="inputTypeText" value="" maxlength="20" title="이름을 입력하세요." /><input type="text" id="inputPurplebookPhone" name="inputPurplebookPhone" class="inputTypeText" value="" maxlength="13" title="{$lang->cellphone_number}를 입력하세요." /><a id="btnAddAddress" href="#"><img src="img/btn_append.gif" alt="추가"></a>
            </div>
		</div><!-- 추가 레이어 -->

		<div class="layer_copy draggable">
			<div class="title"><p>복사할 폴더를 선택하세요</p><span class="btn_closex"><a href="#"><img src="img/btn_close.gif" alt="close" /></a></span></div>
			<div class="bodyArea"><div id="smsPurplebookTargetTreeCopy"></div></div>
			<div class="bottomArea">
				<a class="btn_refresh" href=""><img src="img/btn_refresh.gif" alt="새로고침"></a>
				<a class="btn_copy" id="smsPurplebookDoCopy" href=""><img src="img/btn_copy.gif" alt="복사"></a>
			</div>
		</div><!-- 복사 레이어 -->

		<div class="layer_move draggable">
			<div class="title"><p>이동할 폴더를 선택하세요</p><span class="btn_closex"><a href="#"><img src="img/btn_close.gif" alt="close" /></a></span></div>
			<div class="bodyArea"><div id="smsPurplebookTargetTreeMove"></div></div>
			<div class="bottomArea">
				<a class="btn_refresh" href=""><img src="img/btn_refresh.gif" alt="새로고침"></a>
				<a class="btn_move" id="smsPurplebookDoMove" href=""><img src="img/btn_move.gif" alt="이동"></a>
			</div>
		</div><!-- 이동 레이어 -->


	</div><!-- 1, 2번 왼쪽 주소록 영역 끝 -->

	<div class="purplebook_arrow">
		<span class="btn_arrow_right"><a id="addRecipients" href="#" title="폴더 혹은 명단을 발송대상에 추가"><img src="img/btn_arrow_right.gif" alt="" /></a></span>
		<br /><br /><br />
		<span class="btn_arrow_left"><a id="minusRecipients" href="#" title="선택된 명단을 발송대상에서 제거"><img src="img/btn_arrow_left.gif" alt="" /></a></span>
	</div><!-- 가운데 화살표 영역 끝 -->

	<div class="purplebook_right border-radius">
		<div class="title"><p><img src="img/rightchoice_title.gif" alt="받는사람" /></p><span class="total" id="smsPurplebookTargetListCount">(총 0/명)</span></div>
		<div class="add_list">
			<input type="text" id="inputDirectName" class="inputTypeText" maxlength="10" title="이름" value="" />
            <input type="text" id="inputDirectNumber" maxlength="20" class="inputTypeText" title="폰번호" value="" />
            <button class="btn_append" id="btnDirectAdd" title="받는사람에 추가">추가</button>
            <button class="pop_recent" title="최근입력 번호목록">최근입력번호</button>
		</div>
        <div class="title_info"><span class="checkbox" id="smsPurplebookToggleTarget" title="선택전환"></span><span class="name">이름</span><span class="h_number">핸드폰</span><span class="h_delete">삭제</span><span class="status">상태</span></div>
		<div class="bodyArea"><ul id="smsPurplebookTargetList"></ul></div>
		<div class="bottomArea">
            <a class="pop_addrbook" href="#" title="체크한 받는사람 목록을 주소록에 복사"><img src="img/btn_goaddress.gif" alt="주소록으로" /></a>
			<a class="pop_mass" id="smsPurplebookAddBulk" href="#" title="엑셀에서 복사해 붙여넣기"><img src="img/btn_mass.gif" alt="대량추가" /></a>
            <a class="pop_overlap" href="#" title="중복입력한 폰번호 목록"><span class="label">중복번호</span><span class="number">&nbsp;</span></a>
		</div>

		<!-- 레이어 팝업 영역 -->
		<div class="layer_addrbook draggable">
			<div class="title"><p>주소록으로 복사할 폴더를 선택하세요</p><span class="btn_closex"><a href="#"><img src="img/btn_close.gif" alt="close" /></a></span></div>
			<div class="bodyArea"><div id="smsPurplebookTargetTreeAddrbook"></div></div>
			<div class="bottomArea">
				<a class="btn_refresh" href=""><img src="img/btn_refresh.gif" alt="새로고침"></a>
				<a class="btn_copy" href=""><img src="img/btn_copy.gif" alt="복사"></a>
			</div>
		</div><!-- 이동 레이어 -->

		<div class="layer_overlap draggable">
			<div class="title"><p>중복번호</p><span class="total">(총 0/명)</span><span class="btn_closex"><a href="#"><img src="img/btn_close.gif" alt="close" /></a></span></div>
			<div class="title_info"><span class="checkbox" id="smsPurplebookToggleTarget" title="선택전환"></span><span class="name">이름</span><span class="h_number">핸드폰</span><span class="h_delete">횟수</span></div>
			<div class="bodyArea"><ul id="smsPurplebookExceptList"></ul></div>
		</div><!-- 중복번호 레이어 -->

		<div class="layer_mass draggable">
			<div class="title"><p>대량추가</p><span class="total">(총 0/명)</span><span class="btn_closex"><a href="#"><img src="img/btn_close.gif" alt="close" /></a></span></div>
			<div class="title_info"><span class="checkbox" id="smsPurplebookToggleTarget" title="선택전환"></span><span class="name">번호</span><span class="h_number">이름</span></div>
            <div class="bodyArea">
                <textarea id="smsPurplebookBulkList">엑셀 혹은 텍스트로 정리된 전화번호 목록을 복사해서 붙여넣기하세요.
이름은 생략가능하며 전화번호와 이름은 스페이스로 띄어써야 합니다.

올바른 입력 예시)
01112341234 SK텔레콤
01612341234 KT올레
0191231234  LG텔레콤
010)1234-1234
010-1234-1234
                </textarea>
            </div>
			<div class="bottomArea">
                <!--<a id="btnPurplebookRegister" href=""><img src="img/btn_goaddress.gif" alt="주소록으로"></a>-->
				<a id="btnEmptyList" class="btn_empty" href=""><img src="img/btn_empty.gif" alt="비우기"></a>
				<a id="btnAddList" href=""><img src="img/btn_append.gif" alt="추가"></a>
				<a id="btnVerifyList" href=""><img src="img/btn_check.gif" alt="점검"></a>
			</div>
		</div><!-- 대량추가 레이어 -->

		<div class="layer_recent draggable">
			<div class="title"><p>최근입력번호</p><span class="total">(총 0/명)</span><span class="btn_closex"><a href="#"><img src="img/btn_close.gif" alt="close" /></a></span></div>
			<div class="title_info"><span class="name">이름</span><span class="h_number">핸드폰</span><span class="delete">삭제</span></div>
			<div class="bodyArea"><ul id="recent_list"></ul></div>
		</div><!-- 최근입력번호 레이어 -->

	</div><!-- 오른쪽 전송 영역 끝 -->
</div>
<div id="smsPurplebook_bottom"></div>

<div id="smsMessage_top"></div>
<div id="smsMessage">
	<div class="left_button">
		<a id="btn_pop_chars" href="#"><img src="img/btn_spacialtext.gif" alt="특수문자" /></a>
		<a id="btn_attach_pic" href="#"><img src="img/btn_photoadd.gif" alt="사진추가" /></a>
        <a id="btn_detach_pic" href="#"><img src="img/btn_photodel.gif" alft="사진삭제" /></a>
        <input type="hidden" name="file_srl" value="" />
        <input type="hidden" name="cancel_file_srl" value="" />

        <div class="layer_chars draggable">
			<div class="title"><p>특수문자</p><span class="btn_closex"><a href="#"><img src="img/btn_close.gif" alt="close" /></a></span></div>
            <div class="bodyArea">
                <ul>
                    <!--@for($i = 1;$i <= 67; $i++)-->
                    <li <!--@if($i >= 48 && $i <= 51)-->class="h37"<!--@end-->><a href="javascript:AddChar({$i});"><img src="img/icon_gspecial{$i}.gif"/></a></li>
                    <!--@end-->
                </ul>
            </div>
        </div><!-- 특수문자 레이어 -->
        <div class="layer_upload draggable">
			<div class="title"><p>사진업로드</p><span class="btn_closex"><a href="#"><img src="img/btn_close.gif" alt="close" /></a></span></div>
            <div class="bodyArea"></div>
        </div><!-- 사진추가 레이어 -->
	</div><!-- 왼쪽 버튼 끝 -->

    <div class="msgtype_switch">
        80바이트가 초과되었습니다. 발송방법을 선택해 주세요.
        <div>
            <input type="radio" name="msgtype" id="mmsSend" value="SMS" checked="checked" /><label for="mmsSend">MMS 장문</label>
            <input type="radio" name="msgtype" id="smsSplit" value="SMS" /><label for="smsSplit">SMS 분할</label>
        </div>
    </div>

	<ul class="center_display" id="smsPurplebookContentInput">
        <li>
            <div class="top_btn">
                <button class="btn_record" href="#" title="내용저장">내용저장</button>
                <button class="pop_messages" href="#" title="불러오기">불러오기</button>
            </div>
            <div class="text_area" style="overflow:-moz-scrollbars-vertical; overflow-x:hidden; overflow-y:scroll;">
                <div id="filepicker_preview_file_srl" class="photo" style="display:none;float:left;width:110px;margin-bottom:4px;"></div>
                <textarea id="main_screen" class="phonescreen" style="overflow:hidden;">80bytes초과시 MMS로 전환됩니다.</textarea>
            </div>
            <div class="text_btn">
                <a class="btn_bytes" href="#" title="80바이트 제한"><span>0bytes</span></a>
                <a class="btn_clear" href="#" title="입력내용 지우기"><span>Clear</span></a>
                <a class="close" href="#" style="visibility:hidden;"><span>close</span></a>
                <button class="btn_addwindow" href="#" title="입력창 추가">창추가</button>
            </div>
        </li>
	</ul><!-- 가운데 액정 끝 -->

    <div class="layer_messages draggable">
        <div class="title"><p>저장된 입력내용</p><span class="btn_closex"><a href="#"><img src="img/btn_close.gif" alt="close" /></a></span></div>
        <div class="bodyArea"><ul id="message_list"></ul></div>
    </div><!-- 발신번호관리 레이어 -->




	<div class="right_button">
        <div class="add_info"><span id="projectedType">SMS</span> <span id="projectedCount">0</span>건, 소요비용 <span id="projectedCost">0</span>원</div>
		<div class="add_area">
            <label>보내는 사람</label><input type="text" id="smsPurplebookCallback" maxlength="20" value="{$callback}" title="발신번호 입력" />
            <button class="btn_show_layer" title="발신번호 관리">발신번호관리</button>
		</div>
		<div class="submit_btn">
            
            <a class="btn_forward" id="btnSimplePhoneSend" href="#"><img src="img/btn_forward.gif" alt="보내기" /></a>
			<a class="btn_booking" id="btnSimplePhoneReserv" href="#"><img src="img/btn_booking.gif" alt="예약전송" /></a>
            <input type="hidden" value="0" id="smsPurplebookReservFlag" />
		</div>
		<div class="add_window">* 한자 또는 맞춤법에 어긋나는 글자는 깨져서 전송될 수 있으니 대량전송의 경우 반드시 본인폰으로 테스트 후 발송하세요.</div>


		<div class="layer_sendid draggable">
			<div class="title"><p>발신번호 관리</p><span class="btn_closex"><a href="#"><img src="img/btn_close.gif" alt="close" /></a></span></div>
			<div class="title_info"><span class="default">기본</span><span class="h_number">번호</span><span class="delete">삭제</span></div>
            <div class="bodyArea">
                <ul id="smsPurplebookCallbackList"></ul>
            </div>
			<div class="bottomArea">
                <input type="text" id="smsPurplebookInputCallback" class="inputTypeText" value="" /><button id="smsPurplebookButtonAddCallback">추가</button>
			</div>
		</div><!-- 발신번호관리 레이어 -->

		<div class="layer_reserv">
			<div class="title"><p>예약전송하기</p><span class="btn_closex"><a href="#"><img src="img/btn_close.gif" alt="close" /></a></span></div>
            <div class="bodyArea">
               <!--  <div class="datepickup">
                    <div id="smsReservationInputDate"></div>
                </div> -->
                <div class="reservtime">
                    <input id="inputReservationDate" class="inputTypeText" value="{zdate('Ymd', date('Y-m-d'))}" /><br />
                    <select id="inputReservationHour">
                        <!--@for($i = 0;$i < 24; $i++)-->
                        <option value="{$i}"<!--@if(intval(date('H'))==$i)--> selected="selected"<!--@end-->>{$i}</option>
                        <!--@end-->
                    </select>시 
                    <select id="inputReservationMinute">
                        <!--@for($i = 0;$i < 60; $i++)-->
                        <option value="{$i}"<!--@if(intval(date('i'))==$i)--> selected="selected"<!--@end-->>{$i}</option>
                        <!--@end-->
                    </select>분
                </div>
				<span class="buts">
					<a id="btn_reserv_send" href="#"><img src="img/btn_reserv_send.gif" alt="예약전송" /></a>
				</span>
            </div>
		</div><!-- 예약발송 레이어 -->

        <div class="layer_status draggable">
			<div class="title"><p>전송상태</p><span class="btn_closex"><a href="#"><img src="img/btn_close.gif" alt="close" /></a></span></div>
            <div class="bodyArea">
                <div class="text">전송중입니다...</div>
                <span class="progressBar"></span>
                <div>전체 : <span class="total_count">0</span></div>
                <div>성공 : <span class="success_count">0</span></div>
                <div>실패 : <span class="failure_count">0</span></div>
            </div>
            <div class="bottomArea">
				<a id="btn_stop" href=""><img src="img/btn_stop.gif" alt="일시중지"></a><a id="btn_continue" href=""><img src="img/btn_continue.gif" alt="전송재개"></a>
            </div>
        </div>

	</div><!-- 오른쪽 버튼 끝 -->
</div>
<div id="smsMessage_bottom"></div>


<!--@if($act!='procWidgetGenerateCodeInPage')-->
<script type="text/javascript">
    var g_use_point = '{$widget_info->use_point}';
    var g_sms_point = {$widget_info->sms_point};
    var g_lms_point = {$widget_info->lms_point};
    var g_mms_point = {$widget_info->mms_point};
    var g_manual_mid = '{$widget_info->manual_mid}';
    var g_ticket = '{$ticket}';
    var g_is_logged = <!--@if($is_logged)-->true<!--@else-->false<!--@end-->;
    var g_lang = {};
    var g_send_speed = 100;
    var g_update_speed = 50;
	var g_tpl_path = '{$tpl_path}';

    <!--@foreach($widget_lang as $var => $val)-->
        <!--@if(is_string($val))-->
            jQuery.data(g_lang, '{$var}', '{$val}');
        <!--@end-->
    <!--@end-->
    function getLang(v, append) {
        if (typeof(append) == 'undefined')
            return jQuery.data(g_lang, v);

        return jQuery.data(g_lang, v) + append;
    }
</script>
<!--@end-->
